package com.softwarerusher.model;

/**
 * TBookreturndetailId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class TBookreturndetailId implements java.io.Serializable {

	// Fields

	private TBook TBook;
	private Integer bookreturnNum;
	private TBookreturn TBookreturn;

	// Constructors

	/** default constructor */
	public TBookreturndetailId() {
	}

	/** full constructor */
	public TBookreturndetailId(TBook TBook, Integer bookreturnNum,
			TBookreturn TBookreturn) {
		this.TBook = TBook;
		this.bookreturnNum = bookreturnNum;
		this.TBookreturn = TBookreturn;
	}

	// Property accessors

	public TBook getTBook() {
		return this.TBook;
	}

	public void setTBook(TBook TBook) {
		this.TBook = TBook;
	}

	public Integer getBookreturnNum() {
		return this.bookreturnNum;
	}

	public void setBookreturnNum(Integer bookreturnNum) {
		this.bookreturnNum = bookreturnNum;
	}

	public TBookreturn getTBookreturn() {
		return this.TBookreturn;
	}

	public void setTBookreturn(TBookreturn TBookreturn) {
		this.TBookreturn = TBookreturn;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TBookreturndetailId))
			return false;
		TBookreturndetailId castOther = (TBookreturndetailId) other;

		return ((this.getTBook() == castOther.getTBook()) || (this.getTBook() != null
				&& castOther.getTBook() != null && this.getTBook().equals(
				castOther.getTBook())))
				&& ((this.getBookreturnNum() == castOther.getBookreturnNum()) || (this
						.getBookreturnNum() != null
						&& castOther.getBookreturnNum() != null && this
						.getBookreturnNum()
						.equals(castOther.getBookreturnNum())))
				&& ((this.getTBookreturn() == castOther.getTBookreturn()) || (this
						.getTBookreturn() != null
						&& castOther.getTBookreturn() != null && this
						.getTBookreturn().equals(castOther.getTBookreturn())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getTBook() == null ? 0 : this.getTBook().hashCode());
		result = 37
				* result
				+ (getBookreturnNum() == null ? 0 : this.getBookreturnNum()
						.hashCode());
		result = 37
				* result
				+ (getTBookreturn() == null ? 0 : this.getTBookreturn()
						.hashCode());
		return result;
	}

}